import request from '@/utils/request_admin'

const baseURL = '/message'

export default {
  // 获得所有聊天信息
  getMessage(userId) {
    return request({
      url: `${baseURL}/getById`,
      method: 'GET',
      params: {
        userId,
      },
    })
  },
  // 获得用户信息
  getUserInfo(userId) {
    return request({
      url: `${baseURL}/getUserId`,
      method: 'GET',
      params: {
        userId,
      },
    })
  },
  // 获得审核信息
  getAuditInfo(userId) {
    return request({
      url: `${baseURL}/getAuditInfo`,
      method: 'GET',
      params: {
        userId,
      },
    })
  },
  // 清除未读
  clearNumber(userId) {
    return request({
      url: `${baseURL}/clearNumber`,
      method: 'GET',
      params: {
        userId,
      },
    })
  },
  // 发送消息
  sendMessage(userId, data) {
    return request({
      url: `${baseURL}/sendMessage`,
      method: 'POST',
      data,
      params: {
        userId,
      },
    })
  },
  // 发送截图数据
  snedScreenshot(data) {
    return request({
      url: `${baseURL}/sendScreenshot`,
      method: 'POST',
      data,
    })
  },
}
